package com.young.sso.exception;


import com.young.sso.common.ExceptionCode;


/**
 * 自定义异常类
 *
 * @author young
 * @date 2021/10/25 20:30
 */
public class BusinessException extends Exception{
    /**
     * 枚举类型,内含状态码和msg
     */
    private final ExceptionCode exceptionCode;



    public ExceptionCode getExceptionCode() {
        return exceptionCode;
    }

    public BusinessException(ExceptionCode exceptionCode) {
        super(exceptionCode.getMessage());
        this.exceptionCode = exceptionCode;
    }
}
